fix(settings): allow URI_STUB to be set in the environment to set its value on-the-fly#118
Merged
mgmonteleone merged 1 commit intomgmonteleone:masterfrom Aug 28, 2022
Conversation
…ts value on-the-fly This change would allow a user to do something like the following, just before making the API call, allowing them to specify the `URI_STUB` manually for endpoints that accept something other than v1.5 (for example: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#operation/returnOneAdvancedClusterFromOneProject)
Contributor
Author
|
This is very much a bandaid - a proper solution would restrict what values are allowed by a user (I think only |
Owner
|
@macintacos , looking at how to implement this now.. |
mgmonteleone
pushed a commit
that referenced
this pull request
Aug 19, 2022
Also moved the URI_STUB param to all URIs. This will need to be handled diffferntly for the full fix, and this workaround will need to be backed out. The full solution will be to implement the 1.5 endpoints directly, and analyze and modify the appropriate methods to sue the 1.5 endpoints and needed. Currently it looks like only multi-cloud endpoints use 1.5.
Owner
|
@macintacos , have updated the PR with a few fixes, but would like to discuss if we should go with this workaround, or just go ahead and do the full fix. Since this workaround will cause the full fix to be breaking, and will require a new major version. |
mgmonteleone
pushed a commit
that referenced
this pull request
Aug 27, 2022
Implemented first changes for #121.. First 3 tests passed, moving on to next group of tests.
mgmonteleone
pushed a commit
that referenced
this pull request
Aug 29, 2022
* Fixed Typo for PR #118. Implemented first changes for #121.. First 3 tests passed, moving on to next group of tests. * Implemented first changes for #121.. First 3 tests passed, moving on to next group of tests. * Progress on #121, tests up to test_21. Partitions and databases endpoints remain. * Completed all monitoring and metrics tests for #112. * Removed unused iterator class for #112 * removed old monitoring test file. * Added refactor note. * Small update to enable one more test in monitoring. * Add FEDERATED_DATABASE events (#120) * fix(settings): allow `URI_STUB` to be set in the environment to set its value on-the-fly (#118) This change would allow a user to do something like the following, just before making the API call, allowing them to specify the `URI_STUB` manually for endpoints that accept something other than v1.5 (for example: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#operation/returnOneAdvancedClusterFromOneProject) * Further updates to the events list. Small cleanup of settings file. Co-authored-by: Jérémy Pinsolle <82467106+jpinsolle-betclic@users.noreply.github.com> Co-authored-by: Julian Torres <julian.torres@mongodb.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change would allow a user to do something like the following, just before making the API call, allowing them to specify the
URI_STUBmanually for endpoints that accept something other than v1.5 (for example:https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#operation/returnOneAdvancedClusterFromOneProject)
You could then do something like this to change the value before making the call:
To set if back, the user can just clear the environment variable, or manually revert it to
"/api/atlas/v1.0".